package com.qingfeng.client.dao;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.qingfeng.client.bean.LogisticsCompany;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @author zhangyuefei
 * @version 1.0
 * @date 2020/1/6 10:16 上午
 */
public interface LogisticsCompanyMapper extends BaseMapper<LogisticsCompany> {

    /**
     * 获取默认邮寄/自提地址
     * @param storeId 店铺id
     * @param type 1邮寄2自提
     * @return
     */
    LogisticsCompany selectOneByStoreIdAndType(@Param("storeId")Integer storeId,@Param("type")Integer type);

    List<LogisticsCompany> getByStoreId(@Param("storeId")Integer storeId);

    int deleteByIdAndStoreId(@Param("id")Long id,@Param("storeId")Integer storeId);

    int updateDefaultAddrByStoreId(@Param("updatedDefaultAddr")Integer updatedDefaultAddr,@Param("storeId")Integer storeId);

    int updateDefaultRecvByStoreId(@Param("updatedDefaultRecv")Integer updatedDefaultRecv,@Param("storeId")Integer storeId);



}
